const UserInfoKey = 'UserInfoKey'

/**
 * 获取userInfo
 * @returns userInfo
 */
export const getUserInfo = () => {
  return JSON.parse(localStorage.getItem(UserInfoKey))
}

/**
 * 存储userInfo
 */
export const setUserInfo = (userInfo) => {
  localStorage.setItem(UserInfoKey, JSON.stringify(userInfo))
}

/**
 * 删除userInfo
 */
export const removeUserInfo = () => {
  localStorage.removeItem(UserInfoKey)
}
